﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;

namespace _008
{
    internal class Program
    {
        static void Main(string[] args)
        {
            ArrayList arr_list = new ArrayList();
            Console.WriteLine("以Num1,Num2,Num3,...,Numn的形式输入一个字符串：");
            string str = Console.ReadLine();
            string[] strArray = str.Split(',');
            foreach(string  s in strArray)
            {
                arr_list.Add(s);
            }
            Console.WriteLine("Capacity:{0}",arr_list.Capacity);
            Console.WriteLine("Count:{0}", arr_list.Count) ;
            Console.Write("Content:");
            foreach(string i in arr_list)
            {
                Console.Write(i + "");
            }
            Console.WriteLine();
            Console.Write("Sorted Content:");
            arr_list.Sort();
            foreach(string i in arr_list)
            {
                Console.Write(i + "");
            }
            Console.WriteLine();
            Console.ReadKey();
        }
    }
}
